package com.gkd.service;

import com.gkd.mapper.DepartmentMapper;
import com.gkd.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentImpl implements DepartmentService{
    @Autowired
    DepartmentMapper departmentMapper;

    @Override
    public List<Department> queryDepartmentAll() {
        return departmentMapper.queryDepartmentAll();
    }

    @Override
    public Department selectDepartmentById(int id) {
        return departmentMapper.selectDepartmentById(id);
    }

    public void removeDepartmentById(int id){
        departmentMapper.deleteDepartment(id);
    }


}
